<template>
	<view class="pages">
		<view class="hedaers">
			<view class="hedaersitems" v-for="(items,index) in ScoreboardTypeData" :key="index"
				:class="[itemsIndex == index ? 'xuanzhong' : '']" @click="select(index)">
				{{items.text}}
			</view>
		</view>
		<!-- 线下团队的数据 -->
		<policylist v-if="itemsIndex == 0"></policylist>
		<!-- 自己团队的数据 -->
		<TPreport v-if="itemsIndex == 1"></TPreport>

	</view>
</template>

<script >
	import policylist from './com/PolicyList.vue'
	import TPreport from './com/TPreport.vue'
	export default {
	components:{
		policylist,
		TPreport
		},
		data() {
			return {
				itemsIndex: 0,
				ScoreboardTypeData: [{
					id: 0,
					text: "Policy List"
				}, {
					id: 1,
					text: "TP Report"
				}],
		
			}
		},
		methods: {
			select(index) {
				this.itemsIndex = index
			},

		},

	}
</script>

<style scoped>
	.pages {
		width: 100%;
		height: 100vh;
		overflow-y: auto;
		background-color: #F0F0F0;
		padding: 0 20rpx;
		box-sizing: border-box;

	}





	.hedaers {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		height: 80rpx;
		border-bottom: 2rpx solid #ccc;
	}

	.hedaersitems {
		line-height: 80rpx;
		text-align: center;
		width: 100%;
		height: 100%;
	}

	.xuanzhong {
		border-bottom: 2rpx solid #273562;
		color: #273562;
	}

</style>